<template>
  <div class="menu">

     <van-cell title="订单列表" class="dd" v-if="$store.state.username" is-link  arrow-direction="right" :value="`${ this.$store.state.orderList.length}`" @click="toOrder"/>
           <van-cell title="我收藏的电影" v-if="$store.state.username" is-link arrow-direction="right" :value="`${ this.$store.state.wantSee.length}`"  @click="toSee" />
          
            <van-cell title="清除缓存" v-if="$store.state.username" is-link  @click="show = true" />
    
    <!-- 模态框 -->
    <van-overlay :show="show" @click="show = false">
      <div class="wrapper">
        <div class="block">
          <div class="h_title">
            <h3>确定清除吗？</h3>
            <p>
              <span class="all">（会清除本地已选的:城市位置 订单等）</span>
            </p>
          </div>
          <div class="btn">
            <van-button  type="warning" text="取消" />
            <van-button type="primary" text="确定" @click="clear" />
          </div>
        </div>
      </div>
    </van-overlay>
  </div>
</template>

<script>
export default {
  name: "VueMovieMenuPage",

  data() {
    return {
      show: false,
    };
  },

  mounted() {},

  methods: {
     getoredr(){
        // 跳转路由
        this.$router.push("/orderlistsecond/orderAll");
        // this.store.state.oder.active=0;
      },
   
   toOrder() {
      this.$router.push("/orderlist");
    },
    toSee() {
      this.$router.push("/wantsee");
    },
    clear() {
      //清理缓存
      this.$store.commit("ALLDELETE");
    },
  },
};
</script>

<style lang="less" scoped>
.rr{color:#888}
.menu {
 
  margin-top: 10px;
  margin: 10px 5px 0px 5px;
  .van-row {
    height: 50px;
    line-height: 50px;
    border-radius: 5px;
    color: #000;
    font-weight: 500;
    border-bottom:2px solid #fafafa;
    
    .van-col:nth-child(1) {
      text-align: center;
    }
    p {
      font-size: 16px;
    }
  }
  .all {
    font-size: 12px;
    color: #fff;
  }
  .wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .block {
    margin: 0 auto;
    width: 60%;
    height: 140px;
    border-radius: 14px;
    background-color: #000;
  }
  .h_title {
    height: 80px;
    h3 {
      padding-top: 20px;
      text-align: center;
      line-height: 40px;
      color: #fff;
      font-weight: normal;
    }
    p {
      text-align: center;
    }
  }

  .btn {
    background-color: #000;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    margin: 0 18%;
    .van-button {
      height: 34px;
      border-radius: 5px;
    }
     
  }
}
</style>